class_name GameplaySimpleTransition
extends GameplayStateTransition

##
var _target_state_name: String

##
var _condition_func: Callable

##
var _on_transit_func: Callable


func _init(target_state_name: String, condition_func: Callable, on_transit_func: Callable) -> void:
	_target_state_name = target_state_name
	_condition_func = condition_func
	_on_transit_func = on_transit_func


func _try_condition() -> bool:
	return _condition_func.call()


func _try_transition() -> String:
	return _target_state_name


func _on_transit() -> void:
	_on_transit_func.call()
